package beans;

import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import Controladores.ControladorAuditor;
import basicas.Auditor;
import basicas.LocalidadeEvento;

@ManagedBean
@SessionScoped
public class AuditorBean {
	
	private Auditor auditor = new Auditor();
	private ControladorAuditor controladorauditor = new ControladorAuditor();

	public void adicionar() {
		try {
			controladorauditor.salvar(auditor);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	public Auditor getAuditor() {
		return auditor;
	}

	public void setAuditor(Auditor auditor) {
		this.auditor = auditor;
	}

	public List<Auditor> getAllAuditor() {
		return controladorauditor.listarAuditor();
	}

	public Integer getAllAluguelLocalidadeSize() {
		return controladorauditor.listarAuditor().size();
	}
}
